/**
 * Copyright (c) 2022 www.talkweb.com.cn Inc. AlL rights reserved.
 */
package com.sky.wsp.mybatis.plus.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.wsp.mybatis.plus.dao.entity.UserEntity;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * 用户表 Service 接口
 *
 * @author wangshaopeng@talkweb.com.cn
 * @Date 2023-01-11
 */
public interface IUserService extends IService<UserEntity> {

    /**
     * 分页
     *
     * @param query
     * @param page
     * @return
     */
    Page<UserEntity> findPage(UserEntity query, Page<UserEntity> page);

    /**
     * 列表
     *
     * @param query
     * @return
     */
    List<UserEntity> findList(UserEntity query);

    @Transactional(readOnly = true)
    UserEntity getByMobile(String mobile);

    /**
     * 删除用户表
     *
     * @param id
     * @return
     */
    boolean delete(Long id);
}
